<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <person>            
            <span slot="s2" >我是span1</span>
            <span slot="s1" >我是span2</span>
            <span >我是span3</span>
            <template v-slot:s3>
            <!-- <template slot="s3"> -->
            <!-- <template #s3> -->
                <span >我是span4</span>
                <span >我是span5</span>
            </template>
        </person>
    </div>
</body>
</html>
<script src="./js/vue.js"></script>
<script>

// 定义组件
let person ={
    template:`
        <div>
            <p>我是上p</p>
            <slot name="s1"></slot>
            <p>我是中p1</p>
            <slot ></slot>
            <p>我是中p2</p>
            <slot name="s3"></slot>
            <p>我是中p3</p>
            <slot name="s2"></slot>
            <p>我是下p</p>
        </div>
    `

}




let vm = new Vue({
    el:"#app",
    components:{
        person
    }
});


</script>